package com.huangwenshuo.futurestarschoolmanagement.exception;

/**
 * @author leishengwei 自定义异常类
 */
public class CustomRuntimeException extends RuntimeException {

  private Integer code;
  private Object data;

  public CustomRuntimeException(String message) {
    super(message);
  }

  public CustomRuntimeException(Integer code, String message) {
    super(message);
    this.code = code;
  }

  public CustomRuntimeException(Integer code, Object data, String message) {
    super(message);
    this.code = code;
    this.data = data;
  }

  public CustomRuntimeException(Integer code, String message, Throwable cause) {
    super(message, cause);
    this.code = code;
  }

  public CustomRuntimeException(Integer code, Object data, String message, Throwable cause) {
    super(message, cause);
    this.code = code;
    this.data = data;
  }

  public Integer getCode() {
    return code;
  }

  public Object getData() {
    return data;
  }
}
